﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PRO_DOCS.DAL.AppCode
{
    public class LoginUsers : Database.MainClass
    {
        /// <summary>
        /// Gets the sign in details.
        /// </summary>
        /// <param name="username">The username.</param>
        /// <param name="password">The password.(decrepret) </param>
        /// <returns></returns>B
        public static DAL.Database.LOGIN_USER GetSignInDetails(string username, string password)
        {
            DAL.Database.LOGIN_USER signInDetails = (from user in PRO_DOCSDatabaseDataContext.LOGIN_USERs
                                                    where (user.LOGIN_USER_NAME.Equals(username) &&
                                                           user.LOGIN_USER_PASSWORD.Equals(password) &&
                                                           user.IS_ACTIVE_USER.Equals(true))
                                                    select user).FirstOrDefault();

            return signInDetails;
        }
    }
}
